package com.leo.employ.service.impl

import com.leo.employ.mapper.UserMapper
import com.leo.employ.pojo.User
import com.leo.employ.service.UserService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import java.math.BigInteger

@Service
class UserServiceImpl : UserService {

    @Autowired
    private lateinit var userMapper: UserMapper

    override fun findAllUser(): MutableList<User> {
        return userMapper.selectAll()
    }

    override fun insertUser(user: User) {
        val creat = userMapper.insertCreat(user)
    }

    override fun checkUser(phone: BigInteger): User {
        val example = userMapper.findUserByPhone(phone)
        return example
    }

}